package com.qf.mrboot1.result;

//封装类

public class ResponseData {
    private String eCode;//状态码
    private String errorInfo;
    private Object data;
    private Integer count;
//自定义错误
    public ResponseData(String eCode, String errorInfo, Object data) {
        this.eCode = eCode;
        this.errorInfo = errorInfo;
        this.data = data;
    }
    public ResponseData(String eCode, String errorInfo, Object data, Integer count) {
        this.eCode = eCode;
        this.errorInfo = errorInfo;
        this.data = data;
        this.count = count;
    }
    public ResponseData(ResultCode resultCode, Object data) {
        this.eCode = resultCode.geteCode();
        this.errorInfo = resultCode.getErrorInfo();
        this.data = data;
    }
    public ResponseData(String eCode,String errorInfo) {
        this.eCode = eCode;
        this.errorInfo = errorInfo;
    }
    public ResponseData(ResultCode resultCode) {
        this.eCode = resultCode.geteCode();
        this.errorInfo = resultCode.getErrorInfo();
    }

    public Integer getCount(){
        return count;
    }

    public void seteCode(Integer count) {
        this.count = count;
    }

    public String geteCode() {
        return eCode;
    }

    public void seteCode(String eCode) {
        this.eCode = eCode;
    }

    public String getErrorInfo() {
        return errorInfo;
    }

    public void setErrorInfo(String errorInfo) {
        this.errorInfo = errorInfo;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
